package zhangqi.com.aidl;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;

public class IRemoteService extends Service {

    //当客户端绑定到该服务时，它会执行
    @Override
    public IBinder onBind(Intent intent) {
        return iBinder;
    }

    private IBinder iBinder = new IzqAIDL.Stub(){

        @Override
        public int add(int num1, int num2) throws RemoteException {
            Log.d("TAG","收到了远程的请求，输入的参数是"+num1+"和"+num2);
            return num1+num2;
        }
    };

}
